import Cookies from 'js-cookie'

const TokenKey = 'token'
const Account = 'account'
const User = 'user'
const Authority = 'authority'
const OrderOpenedRow = 'orderOpenedRow'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getAccount() {
  return Cookies.get(Account)
}

export function setAccount(account) {
  return Cookies.set(Account, account)
}

export function getUser() {
  return Cookies.get(User)
}

export function setUser(user) {
  return Cookies.set(User, user)
}

export function getAuthority() {
  return Cookies.get(Authority)
}

export function setAuthority(authority) {
  return Cookies.set(Authority, authority)
}

export function getOrderOpenedRow() {
  return Cookies.get(OrderOpenedRow)
}

export function setOrderOpenedRow(orderOpenedRow) {
  return Cookies.set(OrderOpenedRow, orderOpenedRow)
}
